{% extends 'task_market/base.html' %}
{% load static %}


{% block title %}
    工人市场
{% endblock %}

{% block content %}

    <div class="breadcrumbs">
        <div class="container">
            <div class="row">
                <div class="col-12">
                    <div class="bread-inner">
                        <ul class="bread-list">
                            <li><a href="{% url 'task_market:index' %}">主页<i class="ti-arrow-right"></i></a></li>
                            <li class="active"><a href="#">工人市场</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <section class="shop section">
        <div class="container">
            <div class="row">
                <div class="col-lg-9 mx-auto">
                    <div class="account-content">
                        <h4 class="account-content-title"><i class="far fa-shopping-bag"></i> 工人详情</h4>
                        <div class="account-content-table">
                            <div class="table-responsive">
                                <table class="table table-borderless">
                                    <tr>
                                        <th>用户</th>
                                        <th>账号</th>
                                        <th>姓名</th>
                                        <th>平均分数</th>
                                    </tr>
                                    {% for user in users_list %}
                                        <tr class="account-order-list order-single-product">
                                            <td>
                                                <div class="product-info">{{ user.user_id }}</div>
                                            </td>
                                            <td>
                                                <div class="product-info">{{ user.user_account }}</div>
                                            </td>
                                            <td>
                                                <div class="product-info">{{ user.user_name }}</div>
                                            </td>
                                            <td>
                                                {% if user.user_score|stringformat:"s" == '0.000' %}
                                                    <div class="product-info">100.000</div>
                                                {% else %}
                                                    <div class="product-info">{{ user.user_score }}</div>
                                                {% endif %}
                                            </td>
                                        </tr>
                                    {% endfor %}
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        </div>
    </section>

{% endblock %}